﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter12.Code03.Code03
{
    public class Demo
    {
        public static void Begin()
        {
            Farm<Animal> farm = new Farm<Animal>();
            farm.Animals.Add(new Cow("Jack"));
            farm.Animals.Add(new Chicken("Vera"));
            farm.Animals.Add(new Chicken("Saly"));
            farm.Animals.Add(new SuperCow("Kevin"));
            Farm<Cow> dairyFarm = farm.GetSpecies<Cow>();
            Farm<Chicken> poultryFarm = farm.GetSpecies<Chicken>();
        }
    }
}
